package com.example.controller;

import com.example.common.Pager;
import com.example.common.Result;
import com.example.entity.AreaMessage;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 紫煦桉
 */
@RequestMapping("/areaMessage")
@Controller
public class AreaMessageController extends SuperController<AreaMessage> {
    @Override
    @RequestMapping("/list")
    @ResponseBody
    public Pager<AreaMessage> list(AreaMessage param, @RequestParam(defaultValue = "1", value = "page") String page,
                                   @RequestParam(defaultValue = "10", value = "rows") String size) {
        return super.list(param, page, size);
    }

    @Override
    @RequestMapping("/add")
    @ResponseBody
    public Result add(AreaMessage param) {
        return super.add(param);
    }

    @Override
    @RequestMapping("/edit")
    @ResponseBody
    public Result edit(AreaMessage param) {
        return super.edit(param);
    }

    @Override
    @RequestMapping("/delete")
    @ResponseBody
    public Result delete(AreaMessage param) {
        return super.delete(param);
    }
}
